/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.video.service.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.video.common.constant.enums.VideoSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 视频报警
 *
 * @author daijie
 * @date 2024-02-19 19:02:56
 */
@Data
@TableName(value = "video_alarm", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "视频报警")
public class VideoAlarmEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 报警类型
     */
    @Schema(description = "报警类型")
    private Integer alarmType;

    /**
     * 报警内容
     */
    @Schema(description = "报警内容")
    private String alarmContent;

    /**
     * 报警时间
     */
    @Schema(description = "报警时间")
    private Date alarmTime;

    /**
     * 销警时间
     */
    @Schema(description = "销警时间")
    private Date removeTime;

    /**
     * 处理状态
     */
    @Schema(description = "处理状态")
    private Integer handleStatus;

    /**
     * 处理意见
     */
    @Schema(description = "处理意见")
    private String handleContent;

    public String getAlarmTypeStr() {
        return DictResolver.getItemLabelByValue(VideoSysDictEnum.video_alarm_type, this.alarmType);
    }
}